<!-- 自定义数字范围组件 -->
<template>
    <div>
        <el-input-number ref="input_from" v-model="value[0]" :disabled="disabled" :min="0" :max="value[1]"
                         :size="size" :placeholder="start_placeholder" style="width: 120px"
                         :controls-position="controls_position"/>
        <span> ~ </span>
        <el-input-number ref="input_to" v-model="value[1]" :disabled="disabled" :min="value[0]" :max="max"
                         :size="size" :placeholder="end_placeholder" style="width: 120px"
                         :controls-position="controls_position"/>
    </div>
</template>
<script>
export default {
    name: 'InputNumberRange',
    props: {
        // 初始化范围
        value: {required: true},
        // 是否禁用
        disabled: {
            type: Boolean,
            default: false
        },
        //前提示语
        start_placeholder: {
            type: String,
            default: '最小值'
        },
        //后提示语
        end_placeholder: {
            type: String,
            default: '最大值'
        },
        //按钮位置
        controls_position: {
            type: String,
            default: ''
        },
        //分隔符
        range_separator:{
            type: String,
            default: '~'
        },
        min:{
            type: Number,
            default: 0
        },
        max:{
            type: Number,
            default: 9999999,
        },
        //尺寸
        size: {
            type: String,
            default: 'medium'
        }
    },
    data() {
        return {}
    },
    watch: {},
    methods: {}
}
</script>
